This application relates to hard disc drives and more particularly to an apparatus and method for intelligently controlling the power consumption of disc drives.
Portable computers operate on battery power. Accordingly, the duration for which a portable computer may operate before its battery must be recharged is governed by the level of current which is drawn from the battery, and the total charge the battery is capable of storing. Because it is desirable to produce a portable computer which possesses the capacity to operate for long periods of time before its battery must be recharged, development efforts have focused both on maximizing the total charge carried by such a battery, and on minimizing the current drawn from the battery. Since power is directly related to the square of current, power consumption and current consumption will be referred to interchangeably.
One way in which a computer system may be designed to draw less current from its battery is to provide it with a means for automatically identifying dormant subcomponents, so that those subcomponents might be put in a low power consumption state or turned off completely. For example, a computer display may be configured to automatically disable itself, so as to cease drawing upon the battery, upon discerning that the computer has received no user input for a given period of time. Disc drives in portable computers may be similarly controlled in order to avoid unnecessarily drawing current from the computer""s battery.
Although a disc drive will generally not be entirely powered down while a portable computer is operating, it may be commanded to enter progressively lower power consumption states as time transpires since the last time the drive has been commanded to undertake an action (such as read or write data). For example, if a given amount of time transpires since the drive has executed a command, the drive may power down some of its control circuitry, thereby entering a low power consumption state. Assuming even more time transpires without the drive being commanded to undertake an operation, the drive may additionally turn off its servo capabilities, allowing its heads to float at mid-diameter, thereby entering an even lower power consumption state. In very low current consumption states, the heads may be loaded on to the ramp, and the spindle motor may be turned off. The precise definition of each power consumption state (i.e., what components and/or capabilities are and are not activated) is a matter of choice.
It should be noted that as a disc drive enters progressively lower power consumption states, it will require progressively longer periods of time to return to a full-power state so that it will once again be able to execute a command. Longer recovery periods are required to return from lower power consumption states because more sub-circuits must be re-powered, the spindle motor may have to be returned to proper speed, and because the heads might be required to be unloaded from the ramp.
In the past, disc drives in portable computers have been designed to transition into progressively lower power consumption states based upon the time elapsed since the last time a command was sent to the disc drive. In such a disc drive, a timer is reset and begins to run with each command that is sent to the drive. As the timer meets a given threshold, a corresponding state is entered. This principle is illustrated by FIG. 1. In FIG. 1, three different low current consumption states are shown. While a disc drive is executing commands, it is in a full-power state. As soon as execution ceases, the timer value meets a first threshold (the threshold being set at 0 ms), and a first low current consumption state is entered. Similarly, when the timer value meets the second threshold, a second low current consumption state is entered. The second low current consumption state requires the disc drive to draw less current from the battery than does the first low current consumption states, as is indicated by its lower position on the vertical axis. Each threshold corresponds to entry into a given state, with each successive state requiring that less current be drawn from the system""s battery. In a conventional disc drive, these various thresholds are set at static values.
Under the conventional scheme of power management just described, it is likely for an undesirable situation to occur: the disc drive may decide to transition to a lower current consumption mode just before the host issues a new command to the disc drive. In this scenario, the drive will enter the lower current consumption mode and then immediately return to full-power mode in order to service the new command. Two undesirable effects are caused by behaving thusly. First, extra power is consumed in transitioning in and out of the lower current consumption state. Second, I/O performance of the disc drive is degraded, because time is consumed in transitioning in and out of the lower consumption state.
The method and apparatus in accordance with the present invention solves the aforementioned problem and other problems by controlling power consumption of a disc drive in a computer based upon statistical characteristics of recent user disc access. This is accomplished by a disc drive that initially instantiates a set of thresholds, each of which govern transition into a corresponding power consumption mode. Next, the disc drive measures, at intervals, the time span since the disc drive was last issued a command. Prior to receipt of a new command by the disc drive, the disc drive is progressively transitioned into lower power consumption modes as the measured time span since the last command was issued meets each successive threshold. Following receipt of a new command by the disc drive, the thresholds surrounding the measured time span are adjusted based upon the measured time span.
The invention has the benefit of allowing the disc drive to learn the disc access characteristics of a particular application. Knowledge of that information permits the thresholds governing transition between power consumption modes to be dynamically calculated so as to optimize transitions between power consumption modes.